home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_automake.idb / usr / freeware / share / aclocal / header.m4.z / header.m4
Encoding:
M4 Source File  |  1999-07-16  |  856 b   |  23 lines

  1. # Like AC_CONFIG_HEADER, but automatically create stamp file.
  2.  
  3. AC_DEFUN(AM_CONFIG_HEADER,
  4. [AC_PREREQ([2.12])
  5. AC_CONFIG_HEADER([$1])
  6. dnl When config.status generates a header, we must update the stamp-h file.
  7. dnl This file resides in the same directory as the config header
  8. dnl that is generated.  We must strip everything past the first ":",
  9. dnl and everything past the last "/".
  10. AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
  11. ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
  12. <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
  13. <<am_indx=1
  14. for am_file in <<$1>>; do
  15.   case " <<$>>CONFIG_HEADERS " in
  16.   *" <<$>>am_file "*<<)>>
  17.     echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
  18.     ;;
  19.   esac
  20.   am_indx=`expr "<<$>>am_indx" + 1`
  21. done<<>>dnl>>)
  22. changequote([,]))])
  23.